package cn.lg.soar.boot.fc.entity;

import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.io.Serializable;
import java.time.*;
import javax.validation.constraints.*;

import cn.lg.soar.database.base.entity.BaseEntity;

/**
 * 报修表
 * @author ZhuanZ（无密码）
 * @since 2025-01-22
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "Repair", description = "报修表")
@TableName("fc_repair")
public class Repair extends BaseEntity {

    /** 报修附件 */
    @ExcelProperty(value = "报修附件")
    @ApiModelProperty(value = "报修附件")
    private String attachment;

    /** 扩展字段1 */
    @ExcelProperty(value = "扩展字段1")
    @ApiModelProperty(value = "扩展字段1")
    private String extend1;

    /** 扩展字段2 */
    @ExcelProperty(value = "扩展字段2")
    @ApiModelProperty(value = "扩展字段2")
    private String extend2;

    /** 扩展字段3 */
    @ExcelProperty(value = "扩展字段3")
    @ApiModelProperty(value = "扩展字段3")
    private String extend3;

    /** 报修设施 */
    @NotBlank(message = "报修设施不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "报修设施")
    @ApiModelProperty(value = "报修设施")
    private String facilities;

    /** 报修ID */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId
    private Long id;

    /** 报修图片 */
    @ExcelProperty(value = "报修图片")
    @ApiModelProperty(value = "报修图片")
    private String img;

    /** 报修描述 */
    @ExcelProperty(value = "报修描述")
    @ApiModelProperty(value = "报修描述")
    private String repairDescribe;

    /** 报修状态(0-待维修 1-已维修) */
    @NotNull(message = "报修状态(0-待维修 1-已维修)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "报修状态(0-待维修 1-已维修)")
    @ApiModelProperty(value = "报修状态(0-待维修 1-已维修)")
    private Integer repairState;

    /** 报修时间 */
    @NotNull(message = "报修时间不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "报修时间")
    @ApiModelProperty(value = "报修时间")
    private LocalDateTime repairTime;

    /** 报修人 */
    @NotBlank(message = "报修人不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "报修人")
    @ApiModelProperty(value = "报修人")
    private String repairerName;

    /** 报修人联系电话 */
    @NotBlank(message = "报修人联系电话不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "报修人联系电话")
    @ApiModelProperty(value = "报修人联系电话")
    private String repairerPhone;

    /** 报修人用户ID */
    @NotNull(message = "报修人用户ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "报修人用户ID")
    @ApiModelProperty(value = "报修人用户ID")
    private Long repairerUserId;

    /** 房间配套ID */
    @ExcelProperty(value = "房间配套ID")
    @ApiModelProperty(value = "房间配套ID")
    private Long roomFurnitureId;

    /** 房间ID */
    @NotNull(message = "房间ID不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "房间ID")
    @ApiModelProperty(value = "房间ID")
    private Long roomId;

    /** 租房ID */
    @ExcelProperty(value = "租房ID")
    @ApiModelProperty(value = "租房ID")
    private Long tenancyRoomId;

    /** 维修描述 */
    @ExcelProperty(value = "维修描述")
    @ApiModelProperty(value = "维修描述")
    private String upkeepDescribe;

    /** 维修金额 */
    @ExcelProperty(value = "维修金额")
    @ApiModelProperty(value = "维修金额")
    private String upkeepPay;

    /** 维修时间 */
    @ExcelProperty(value = "维修时间")
    @ApiModelProperty(value = "维修时间")
    private LocalDateTime upkeepTime;

    /** 维修人 */
    @ExcelProperty(value = "维修人")
    @ApiModelProperty(value = "维修人")
    private String upkeeperName;

    /** 维修人联系电话 */
    @ExcelProperty(value = "维修人联系电话")
    @ApiModelProperty(value = "维修人联系电话")
    private String upkeeperPhone;

    /** 乐观锁 */
    @NotNull(message = "乐观锁不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "乐观锁")
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
